package com.itheima.zixi2.ZuoYe3;

import java.util.Objects;


public class IdCard {
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IdCard idCard = (IdCard) o;
        return ID == idCard.ID && phonenumber == idCard.phonenumber && Double.compare(money, idCard.money) == 0 && Objects.equals(name, idCard.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ID, name, phonenumber, money);
    }

    @Override
    public String toString() {
        return "IdCard{" +
                "ID=" + ID +
                ", name='" + name + '\'' +
                ", phonenumber=" + phonenumber +
                ", money=" + money +
                '}';
    }

    public IdCard() {
    }

    public IdCard(String ID, String name, int phonenumber, double money) {
        this.ID = ID;
        this.name = name;
        this.phonenumber = phonenumber;
        this.money = money;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(int phonenumber) {
        this.phonenumber = phonenumber;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    private String ID;
    private String name;
    private int phonenumber;
    private double money;
}
